import request from '@/utils/request'

// 查询salesperson列表
export function listSalesperson(query) {
  return request({
    url: '/costumeShop/salesperson/list',
    method: 'get',
    params: query
  })
}

// 查询salesperson详细
export function getSalesperson(salespersonId) {
  return request({
    url: '/costumeShop/salesperson/' + salespersonId,
    method: 'get'
  })
}

// 新增salesperson
export function addSalesperson(data) {
  return request({
    url: '/costumeShop/salesperson',
    method: 'post',
    data: data
  })
}

// 修改salesperson
export function updateSalesperson(data) {
  return request({
    url: '/costumeShop/salesperson',
    method: 'put',
    data: data
  })
}

// 删除salesperson
export function delSalesperson(salespersonId) {
  return request({
    url: '/costumeShop/salesperson/' + salespersonId,
    method: 'delete'
  })
}
